<template>
  <div>
    <header>
      <v-header :seller="seller"></v-header>
    </header>
    <ul class="tabs border-1px">
      <li class="tabs-item">
        <router-link to="/goods">商品</router-link>
      </li>
      <li class="tabs-item">
        <router-link to="/ratings">评价</router-link>
      </li>
      <li class="tabs-item">
        <router-link to="/seller">商家</router-link>
      </li>
    </ul>
    <router-view></router-view>
  </div>
</template>

<script>
import Header from '@/components/header/Header'
export default {
  data () {
    return {
      seller: {}
    }
  },
  created () {
    this.$http.get('/api/seller').then((res) => {
      let data = res.data
      if (data.errCode === 0) {
        this.seller = data.data
        console.log(this.seller)
      }
    })
  },
  components: {
    'v-header': Header
  }
}
</script>

<style lang="stylus" rel="stylesheet/stylus" scoped>
  @import "common/stylus/mixin.styl"
  .tabs
    width: 100%
    display: flex
    font-size: .28rem
    //border-bottom: 1px solid rgba(7,17,27,.1)
    border-1px(rgba(7,17,27,.1))
    .tabs-item
      flex:1
      line-height: .8rem
      text-align: center
      a
        color:rgb(77,85,93)
        &.active
          color:rgb(240,20,20)
</style>
